<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let y = prompt("请输入年");
    let m = prompt("请输入月");
    let mInt = parseInt(m);
    let d = prompt("请输入日");
    let count = parseInt(d);
    switch (mInt) {
        case 12:
            count += 31;
        case 11:
            count += 31;
        case 10:
            count += 30;
        case 9:
            count += 31;
        case 8:
            count += 31;
        case 7:
            count += 30;
        case 6:
            count += 31;
        case 5:
            count += 30;
        case 4:
            count += 31;
        case 3:
            if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) {
                count += 29;
            } else {
                count += 28;
            }

        case 2:
            count += 31;
    }
    console.log(`${y}年${m}月${d}日是第${count}天`);
</script>
</body>
</html>